package com.mfnote.view.chatemoji;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

import android.content.Context;

/**
 * 文件工具类
 * @author ZHF
 *
 */
public class FileUtils {

	/**读取表情配置文件**/
	public static List<String> getEmojiFile(Context context) {
		try {
			List<String> list = new ArrayList<String>();
			InputStream in = context.getResources().getAssets().open("emoji");//读取asset下的文件
			BufferedReader br = new BufferedReader(new InputStreamReader(in, "UTF-8"));
			
			String str = null;
			while((str = br.readLine()) != null) {
				list.add(str);
			}
			return list;
			
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}
}
